<h1>Update SVN Password via web service</h1>
<form method="post">
 Username: <input name="username"><br>
 Password: <input name="password" type="password"><br>
 <input type="submit">
</form>
<?php
if (isset($_POST['username']) && isset($_POST['password'])) {
    require_once 'HTTP/Request.php';
    $req = new HTTP_Request($hostname. '/syncAuth.php/getsalt');
    $req->setMethod(HTTP_REQUEST_METHOD_GET);
    $req->sendRequest();
    $salt = $req->getResponseBody();
    $code = $req->getResponseCode();
    $cookies = $req->getResponseCookies();
    $session = $cookies[0]['value'];

    $send = new HTTP_Request($hostname . '/syncAuth.php/sync');
    $send->setMethod(HTTP_REQUEST_METHOD_POST);
    $send->addCookie('PHPSESSID', $session);
    $send->addPostData('salt', $salt);
    $send->addPostData('handle', $_POST['username']);
    $send->addPostData('passwd', md5($_POST['password']));
    $send->sendRequest();
    $sendBody = $send->getResponseBody();
    $sendCode = $send->getResponseCode();
    var_dump($sendBody);
    var_dump($sendCode);
}